package entity;

import java.io.Serializable;

public class Product implements Serializable {
    private Integer pid;

    private String productName;

    private Double productPrice;

    private Integer productNum;

    private String productType;

    private String productImg;

    private Integer productStatus;

    private String productDec;


    public Product() {
    }

    public Product(Integer pid, String productName,String productImg, Double productPrice, Integer productNum ) {
        this.pid = pid;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productNum = productNum;
        this.productImg = productImg;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    public Double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(Double productPrice) {
        this.productPrice = productPrice;
    }

    public Integer getProductNum() {
        return productNum;
    }

    public void setProductNum(Integer productNum) {
        this.productNum = productNum;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType == null ? null : productType.trim();
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg == null ? null : productImg.trim();
    }

    public Integer getProductStatus() {
        return productStatus;
    }

    public void setProductStatus(Integer productStatus) {
        this.productStatus = productStatus;
    }

    public String getProductDec() {
        return productDec;
    }

    public void setProductDec(String productDec) {
        this.productDec = productDec == null ? null : productDec.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", pid=").append(pid);
        sb.append(", productName=").append(productName);
        sb.append(", productPrice=").append(productPrice);
        sb.append(", productNum=").append(productNum);
        sb.append(", productType=").append(productType);
        sb.append(", productImg=").append(productImg);
        sb.append(", productStatus=").append(productStatus);
        sb.append(", productDec=").append(productDec);
        sb.append("]");
        return sb.toString();
    }
}